package top.sigetech.boot02.vo;

import java.util.HashMap;
import java.util.Map;

public class BaseVo extends HashMap<String, Object> {

    public static BaseVo Ok(){
        BaseVo baseVo = new BaseVo();
        baseVo.put("code",1);
        baseVo.put("msg","ok");
        return baseVo;
    }

    public static BaseVo Ok(Object data){
        BaseVo baseVo = new BaseVo();
        baseVo.put("code",1);
        baseVo.put("msg","ok");
        baseVo.put("data",data);
        return baseVo;
    }
    public static BaseVo error(){
        BaseVo baseVo = new BaseVo();
        baseVo.put("code",0);
        baseVo.put("msg","ok");
        return baseVo;
    }
    public static BaseVo error(String msg){
        BaseVo baseVo = new BaseVo();
        baseVo.put("code",0);
        baseVo.put("msg",msg);
        return baseVo;
    }


}
